package com.yuedao.sender.model;

import javax.persistence.Entity;

import cn.ydx.protobuf.OTIpcDef;

/**
 * @author Jason Biao
 * 
 * 网约车驾驶员移动终端信息接口
 */
@Entity
public class BaseInfoDriverApp extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1200107471382906691L;

	private int address;

	private String licenseId;

	private String driverPhone;

	private int netType;

	private String appVersion;

	private int mapType;

	private int state;

	public int getAddress() {
		return address;
	}

	public void setAddress(int address) {
		this.address = address;
	}

	public String getLicenseId() {
		return licenseId;
	}

	public void setLicenseId(String licenseId) {
		this.licenseId = licenseId;
	}

	public String getDriverPhone() {
		return driverPhone;
	}

	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
	}

	public int getNetType() {
		return netType;
	}

	public void setNetType(int netType) {
		this.netType = netType;
	}

	public String getAppVersion() {
		return appVersion;
	}

	public void setAppVersion(String appVersion) {
		this.appVersion = appVersion;
	}

	public int getMapType() {
		return mapType;
	}

	public void setMapType(int mapType) {
		this.mapType = mapType;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	  public static OTIpcDef.BaseInfoDriverApp convert(BaseInfoDriverApp data){
	        OTIpcDef.BaseInfoDriverApp item = OTIpcDef.BaseInfoDriverApp.newBuilder()
	                .setCompanyId(data.getCompanyId())
	                .setAddress(data.getAddress())
	                .setLicenseId(data.getLicenseId())
	                .setDriverPhone(data.getDriverPhone())
	                .setNetType(data.getNetType())
	                .setAppVersion(data.getAppVersion())
	                .setMapType(data.getMapType())
	                .setState(data.getState())
	                .setFlag(data.getFlag())
	                .setUpdateTime(Long.valueOf(data.getUpdateTime()))
	                .build();

	        return item;
	    }
}
